<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TrabalhodeOrgII: Código-Fonte de hash.h</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Gerado por Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TrabalhodeOrgII&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;Principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Arquivos</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;de&#160;Arquivos</span></a></li>
      <li><a href="globals.html"><span>Arquivos&#160;Membros</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<h1>hash.h</h1>  </div>
</div>
<div class="contents">
<a href="hash_8h.html">Vá para a documentação deste arquivo.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef HASH_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define HASH_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<a name="l00006"></a><a class="code" href="hash_8h.html#a32648b7b75bbea1bb4861d371ca8924a">00006</a> <span class="preprocessor">#define TAMANHOVETOR 2617</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a><a class="code" href="hash_8h.html#adb17b03fe119278a184656012ad5abd4">00008</a> <span class="preprocessor">#define CHECKMOD 2609</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a><a class="code" href="structhash__t.html">00010</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
<a name="l00012"></a><a class="code" href="structhash__t.html#a7b0e714c823bf1e34aacaf7c8eab1739">00012</a>         <span class="keywordtype">int</span>    data[<a class="code" href="hash_8h.html#a32648b7b75bbea1bb4861d371ca8924a">TAMANHOVETOR</a>];
<a name="l00014"></a><a class="code" href="structhash__t.html#ab3fc0a9d5c56f0eb8769e1b78bde835b">00014</a>         <span class="keywordtype">size_t</span> <a class="code" href="structhash__t.html#ab3fc0a9d5c56f0eb8769e1b78bde835b">used</a>;
<a name="l00015"></a><a class="code" href="structhash__t.html#a42dc68e1f63e030c873e91cb1072872a">00015</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structhash__t.html#a42dc68e1f63e030c873e91cb1072872a">acessosParaEscrita</a>;
<a name="l00016"></a><a class="code" href="structhash__t.html#a60a64c3aa0629d39fa9a90e29e7f0d3e">00016</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structhash__t.html#a60a64c3aa0629d39fa9a90e29e7f0d3e">acessosParaLeitura</a>;
<a name="l00017"></a><a class="code" href="structhash__t.html#a6a5ceb3b640a0f3024f7a5bbb40bb8a5">00017</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structhash__t.html#a6a5ceb3b640a0f3024f7a5bbb40bb8a5">totalTentativasPalavrasEscritas</a>;
<a name="l00018"></a><a class="code" href="structhash__t.html#a0d919ebc87ede4fd2b4bd382c1e53224">00018</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structhash__t.html#a0d919ebc87ede4fd2b4bd382c1e53224">totalTentativasPalavrasLidas</a>;
<a name="l00019"></a>00019 } <a class="code" href="structhash__t.html">hash_t</a>;
<a name="l00020"></a>00020 
<a name="l00024"></a>00024 <a class="code" href="structhash__t.html">hash_t</a> *<a class="code" href="hash_8c.html#a22c2157b1ecae427632e60707fff6f95" title="função para encapsular a criação da tabela de hash, feitar para fazer a interface entre o código não ...">hash_create</a>();
<a name="l00025"></a>00025 
<a name="l00029"></a>00029 <span class="keywordtype">void</span> <a class="code" href="hash_8c.html#a33d0ca69b3feca00e86b3b2a2d023e5a" title="libera os recursos de memória alocados para a tabela">hash_destroy</a>(<a class="code" href="structhash__t.html">hash_t</a>* hash);
<a name="l00030"></a>00030 
<a name="l00034"></a>00034 <span class="keywordtype">void</span> <a class="code" href="hash_8c.html#a1d2e54cf523fd5d42e759d77669f8651" title="esvazia todo o conteúdo da tabela, deixando-a pronta para uso novamente.">hash_reset</a>(<a class="code" href="structhash__t.html">hash_t</a> *hash);
<a name="l00035"></a>00035 
<a name="l00039"></a>00039 <span class="keywordtype">void</span> <a class="code" href="hash_8c.html#a90403fade499eb7cdced74ab643404a1" title="imprime na tela as estatísticas obtidas com as funções de hash atuais em uso.">hash_stats</a>(<a class="code" href="structhash__t.html">hash_t</a> *hash);
<a name="l00040"></a>00040 
<a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="hash_8c.html#a04642261866116e1b8af8b16b4ceb280" title="método que faz a inserção de uma palavra na tabela hash">hash_insert</a>(<a class="code" href="structhash__t.html">hash_t</a> *<a class="code" href="main_8c.html#a6483ebb78663736a00567f2f579ff7eb">table</a>, <span class="keywordtype">char</span> * palavra);
<a name="l00046"></a>00046 
<a name="l00052"></a>00052 <span class="keywordtype">int</span> <a class="code" href="hash_8c.html#a95b6dc4600df05ef3b88741f85ec1355" title="procura ocorrências da palavra na tabela hash">hash_find</a>(<a class="code" href="structhash__t.html">hash_t</a> *<a class="code" href="main_8c.html#a6483ebb78663736a00567f2f579ff7eb">table</a>, <span class="keywordtype">char</span> * palavra);
<a name="l00053"></a>00053 
<a name="l00058"></a>00058 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="hash_8c.html#ac6c753a17945c05962a896978a10247c" title="função que retornará , dado uma palavra , um número que indica aonde ocorrerá a primeira tentativa de...">hash1</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * palavra);
<a name="l00059"></a>00059 
<a name="l00064"></a>00064 <span class="keywordtype">int</span> <a class="code" href="hash_8c.html#aab8b1c0599a908ed0dbfc10c5ef005bf" title="função que retornará , dado uma palavra , um número de incremento que será utilizado se a inserção nã...">hash2</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * palavra);
<a name="l00065"></a>00065 
<a name="l00070"></a>00070 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="hash_8c.html#a46a9c760f6f1d90524b0683b182d64d4" title="função que retornará , dado uma palavra , um número que será inserido na tabela hash.">hash3</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * palavra);
<a name="l00071"></a>00071 
<a name="l00072"></a>00072 <span class="preprocessor">#endif </span><span class="comment">/* HASH_H */</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>Gerado em Terça, 8 de Novembro de 2011 22:31:31 para TrabalhodeOrgII por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>
